//package com.github.websocket.configuration;
//
//import com.github.websocket.handler.ChatWebSocketHandler;
//import com.github.websocket.interceptor.WebSocketHandshakeInterceptor;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Lazy;
//import org.springframework.messaging.simp.SimpMessagingTemplate;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.config.annotation.EnableWebMvc;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
//import org.springframework.web.socket.config.annotation.EnableWebSocket;
//import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
//import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
//
///**
// * @author  Crab2Died
// *  <p></p>
// */
//
////@Configuration
////@EnableWebMvc
////@EnableWebSocket
//public class WebSocketConfig extends WebMvcConfigurerAdapter implements WebSocketConfigurer{
//
//    @Override
//    public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
//        registry.addHandler(chatWebSocketHandler(), "/ws").setAllowedOrigins("*").addInterceptors(myInterceptor());
//        registry.addHandler(chatWebSocketHandler(), "/ws/sockjs").setAllowedOrigins("*").addInterceptors
// (myInterceptor()).withSockJS();
//    }
//
//    @Bean
//    public ChatWebSocketHandler chatWebSocketHandler() {
//        return new ChatWebSocketHandler();
//    }
//
//    @Bean
//    public WebSocketHandshakeInterceptor myInterceptor(){
//        return new WebSocketHandshakeInterceptor();
//    }
//}
